<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <meta http-equiv="X-UA-Compatible" content="ie=edge">
    <title>Document</title>
    <style>
        /*子元素不设置width，它会继承父元素的width*/
        *{margin: 0;padding: 0}
        .one{
            height: 50px;
            background: red;
        }
        /*height特殊 父元素不设置height,他会获取子元素的height*/
    </style>
</head>
<body>
    <div class="one"></div>
</body>
</html>